package chapter09.collection;

import java.util.HashSet;
import java.util.Scanner;

/**
 * @Description: 无序集 HashSet
 * @Author: insight
 * @LastDate: 2021/1/26
 */
public class Test02_HashSet {
    public static void main(String[] args) {
        var set = new HashSet<>();

        var in = new Scanner(System.in);
        while (in.hasNext()) {
            var word = in.next();
            set.add(word);
        }

        var it = set.iterator();
        for (int i = 0; i < 10 && it.hasNext(); i++) {
            System.out.println(it.next());
        }
    }
}
